<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>{$productTitle}-出行日期</title>
  <link rel="stylesheet" href="__PUBLIC__/css/style.css">
  <!-- <link rel="stylesheet" href="__PUBLIC__/css/font.css" /> -->
  <script type="text/javascript" src="__PUBLIC__/js/jquery.min.js"></script>
  <!-- // <script type="text/javascript" src="__PUBLIC__/js/common.js"></script> -->
  <script type="text/javascript" src="/Public/js/jquery.form.min.js"></script>
  <script type="text/javascript" src="__PUBLIC__/plugin/layer/layer.js"></script>

</head>
<body style="min-width: 100%;">
  <script type="text/javascript" src="{:U(MODULE_NAME. '/Public/editor',array('editorId'=>'content'))}"></script>
  <script type="text/javascript">
  	$(function(){
  		$("#form_do").submit(function(){
  			var name = $("input[name='title']");
  			if($.trim(name.val())==''){
  				name.parent().find("span").remove().end().append("<span class='error'>行程标题不能为空</span>");
  				return false;
  			}else {
  				name.parent().find("span").remove().end();
  			}

  		});

         $('#button-submit').click(function () {
          $('#form').ajaxSubmit({
            dataType:  'json',
            success:function (data) {
              if(data.valid == true)
              {
                layer.msg(data.state);
                window.parent.document.location.reload();
              }
              else
              {
                layer.msg(data.state);
              }
            }
          })
        })

      });
  </script>
  <div class="form">
    <form method='post' id="form" action="{:U(MODULE_NAME. '/Webproduct/travelreferenceInfoPost',array('id'=>$id,'productID'=>$productID))}">
      <dl>
        <dt> 产品标题：</dt>
        <dd>
          <input type="text" name="productTitle"  class="inp_large" value="{$product.productTitle}" readonly="readonly" />
        </dd>
      </dl>
      <dl>
        <dt> 行程标题：</dt>
        <dd>
          <input type="text" name="title"  class="inp_large" value="{$travelreference.title}" />
        </dd>
      </dl>
      <dl>
        <dt> 行程内容：</dt>
        <dd>
          <textarea name="content" id="content"> {$travelreference.content}</textarea>
        </dd>
      </dl>
      <dl>
        <dt> 排序：</dt>
        <dd>
          <input type="text" name="sort"  class="inp_small" value="<if condition="$travelreference['sort']">{$travelreference.sort}<else />255</if>" />
        </dd>
      </dl>
      <dl>
        <dt> </dt>
        <dd>
          <input type="button" class="button-green" id="button-submit" value="保 存">
        </dd>
      </dl>
    </form>
  </div>
</body>
</html>